package two.chapter_1.c1_4;

import edu.princeton.cs.algs4.StdOut;
import edu.princeton.cs.algs4.StdRandom;

public class Ex1_4_8 {


    public static void main(String[] args){
        int MAX=100000;
        int N=10000;
        int[] a=new int[N];
        for (int i=0;i<N;i++){
            a[i]=StdRandom.uniform(MAX);
        }
        //int a[]={1,2,2,2,3};
        Stopwatch stopwatch=new Stopwatch();
        StdOut.println(EqaulNumberFinder.find(a));
        StdOut.println(stopwatch.elapseTime());

        Stopwatch stopwatch2=new Stopwatch();
        StdOut.println(EqaulNumberFinder.findFast(a));
        StdOut.println(stopwatch2.elapseTime());
    }
}
